package org.hsc.proxy;
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import java.io.IOException;
import java.io.OutputStream;
import java.io.FilterOutputStream;

/**
 *
 * @author Alon
 */
public class ServerOutputStream extends FilterOutputStream {
  private OutputStream out;

  public ServerOutputStream(OutputStream out) {
    super(out);
    this.out = out;
  }

  public synchronized void write(int b) throws IOException {
    out.write(b);
  }

  public synchronized void write(byte[] data, int offset, int length) 
   throws IOException {
    out.write(data, offset, length);
  }

  public void flush() throws IOException {
    out.flush();
  }
  
  public void close() throws IOException {
    out.close();
  }

  public void writeBytes (String input) throws IOException{
    this.write(input.getBytes());
  }
}
